<template>
  <div class="order-info">
    <div v-if="createTime"><span class="order-label">下单时间:</span><span> {{value.createTime}}</span></div>
    <div><span class="order-label">商品原价:</span><span class="red">{{value.currency.symbol}}{{value.purchasePrice}}</span>
    </div>
    <div v-if="value.discount>0"><span class="order-label">商品折扣:</span><span class="red"> {{value.discounts}}%</span>
    </div>
    <div v-if="value.globalFreight!=null&&value.globalFreight>0"><span class="order-label">外币运费:</span>{{value.currency.symbol}}{{value.globalFreight}}
    </div>
    <div v-if="value.freight!=null&& value.freight>0"><span class="order-label">运费:</span>￥{{value.freight}}</div>
    <div v-if="value.exchangeRate!=null&& value.exchangeRate!=1"><span class="order-label">汇率:</span>{{value.exchangeRate}}
    </div>
    <div><span class="order-label">订单类型:</span>
      <span v-if="value.type==1" class="order-type"> 代购</span>
      <span v-else-if="value.type==2" class="order-type">自购</span>
      <span v-else class="order-type">运费</span>
    </div>
    <div class="order-pay-sn"><span>付款编码:</span> {{value.paySn}}</div>
  </div>
</template>

<script>
  export default {
    name: 'HOrderInfoDisplay',
    data() {
      return {}
    },
    props: {
      value: {
        type: Object,
        default: {}
      },
      sn: {
        type: Boolean,
        default: true
      },
      createTime: {
        type: Boolean,
        default: true
      }
    }
  }
</script>
